using System;
using System.Collections.Generic;
using System.Text;

namespace Raxxla.DayBreak.Core
{
    public class DeviceEvents
    {

        /// <summary>
        /// Handles event which will be fired immediately after the Direct3D device has been 
        /// created
        /// </summary>
        public interface Creation
        {
            /// <summary>
            /// This event will be fired immediately after the Direct3D device has been 
            /// created, which will happen during application initialization. This is the best 
            /// location to create Pool.Managed resources since these resources need to be 
            /// reloaded whenever the device is destroyed. Resources created  
            /// here should be released in the OnDetroyDevice callback. 
            /// </summary>
            /// <param name="device">The Direct3D device</param>
            void OnCreateDevice(RenderDevice device);
        }

        /// <summary>
        /// Handles event which will be fired immediately after the Direct3D device has been 
        /// reset, which will happen after a lost device scenario, a window resize, and a 
        /// fullscreen toggle.
        /// </summary>
        public interface Restoring
        {
            /// <summary>
            /// This event will be fired immediately after the Direct3D device has been 
            /// reset, which will happen after a lost device scenario, a window resize, and a 
            /// fullscreen toggle. This is the best location to create Pool.Default resources 
            /// since these resources need to be reloaded whenever the device is reset. Resources 
            /// created here should be released in the OnLostDevice callback. 
            /// </summary>
            /// <param name="device">The Direct3D device</param>
            void OnResetDevice(RenderDevice device);
        }

        /// <summary>
        /// Handles event which will be called after the Direct3D device has 
        /// entered a lost state and before Device.Reset() is called.
        /// </summary>
        public interface Losing
        {
            /// <summary>
            /// This function will be called after the Direct3D device has 
            /// entered a lost state and before Device.Reset() is called. Resources created
            /// in the OnResetDevice callback should be released here, which generally includes all 
            /// Pool.Default resources.
            /// </summary>
            void OnLostDevice();
        }

        /// <summary>
        /// Handles event which will be called immediately after the Direct3D device has 
        /// been destroyed, which generally happens as a result of application termination.
        /// </summary>
        public interface Destroing
        {
            /// <summary>
            /// This callback function will be called immediately after the Direct3D device has 
            /// been destroyed, which generally happens as a result of application termination. 
            /// Resources created in the OnCreateDevice callback should be released here, which 
            /// generally includes all Pool.Managed resources. 
            /// </summary>
            void OnDestroyDevice();
        }

        public interface AllEvents : Creation, Restoring, Losing, Destroing
        {
        }

    }
}
